package com.itheima.service.impl;

import com.itheima.service.FileService;
import com.itheima.utils.MyALiYunUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.UUID;

@Service
@Primary
public class FileServiceImpl2 implements FileService {

    @Autowired
    private MyALiYunUtils myALiYunUtils;


    @Override
    public String saveFile(MultipartFile file) throws IOException {
        String s = myALiYunUtils.uploadOss(file);
        return s;
    }
}
